package com.zbkj.crmeb.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 资金状态类型
 * @Description:
 * @author cyz
 * @date 2021-05-12
 */
public enum CommissionStatusEnum implements IEnum<Integer> {
    /**
     * 资金状态
     */
    YJDJ_佣金冻结(1, "冻结"),
    YJJD_佣金解冻(2, "解冻"),
    TXSQ_提现申请中(1, "申请中"),
    TXCG_提现成功(2, "成功"),
    TXSB_提现失败(3, "失败");

    private Integer code;
    private String msg;

    public static CommissionStatusEnum valueOf(Integer code) {
        for (CommissionStatusEnum value : values()) {
            if (value.getCode() == code) {
                return value;
            }
        }

        return null;
    }

    CommissionStatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    @Override
    @JsonValue
    public Integer getValue() {
        return code;
    }

}
